<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			var count=0;
			var flag=true;
			for(var i=1;i<=5;i++){
				var score=parseFloat(prompt("请输入第"+i+"门成绩：",""));
				
				if(!(isNaN(score))&score>0){
					count+=score;
				}else{
					alert("输入的不是数字或数字小于0");
					flag=false;
					break;
				}
			}
			if(flag){
				alert("5门科目总成绩是："+count);
			}
			
			
			
		</script>
	</head>
	<body>
	</body>
</html>
